package com.dehui.traders.ui.fragment;

import android.os.Bundle;

import com.dehui.traders.BR;
import com.dehui.traders.R;
import com.dehui.traders.databinding.FragmentStrateDetailBinding;
import com.dehui.traders.ui.viewmodle.StrateDetailViewModel;

import me.goldze.mvvmhabit.base.BaseFragment;

/**
 * Created by hqq on 18.3.30.
 */

public class StrateDetailFragment extends BaseFragment<FragmentStrateDetailBinding,StrateDetailViewModel>{

    public static final String IntentKey_StrateName = "IntentKey_StrateName";
    private String strateName;

    @Override
    public int initContentView() {
        return R.layout.fragment_strate_detail;
    }

    @Override
    public void initParam() {
        //获取列表传入的实体
        Bundle mBundle = getArguments();
        if (mBundle != null) {
            strateName = mBundle.getString(IntentKey_StrateName);
        }
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public StrateDetailViewModel initViewModel() {
        return new StrateDetailViewModel(getContext(),strateName);
    }
}
